import request from '@/utils/request'

// 查询系数列表
export function listCoefficient(query) {
  return request({
    url: '/bomcostestimation/basedocument/coefficient/list',
    method: 'get',
    params: query
  })
}

// 查询系数详细
export function getCoefficient(fid) {
  return request({
    url: '/bomcostestimation/basedocument/coefficient/' + fid,
    method: 'get'
  })
}

// 新增系数
export function addCoefficient(data) {
  return request({
    url: '/bomcostestimation/basedocument/coefficient',
    method: 'post',
    data: data
  })
}

// 修改系数
export function updateCoefficient(data) {
  return request({
    url: '/bomcostestimation/basedocument/coefficient',
    method: 'put',
    data: data
  })
}

// 删除系数
export function delCoefficient(fid) {
  return request({
    url: '/bomcostestimation/basedocument/coefficient/' + fid,
    method: 'delete'
  })
}

// 导入系数
export function importData(list) {
  return request({
    url: '/bomcostestimation/basedocument/coefficient/importData',
    method: 'post',
    data: list,
    timeout: 1800000
  })
}
